<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>S-admin v1.0</title>
    <link rel="shortcut icon" href="layui/favicon.jpg"/>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="layui/css/s-login.css">
</head>
<body style="background-color: #2F4056;">
    <div class="s-box">
        <div class="s-top">
            <h2 class="title" style="display: inline-block;">用户登录</h2>
        </div>
        <div class="s-middle">
            <div class="s-logo">
                <img src="layui/favicon.jpg" alt="DreamPHP">
            </div>
            <div class="s-content">
                <form action="" class="layui-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label">
                            <i class="layui-icon" style="font-size: 30px;">&#xe612;</i>
                        </label>
                        <div class="layui-input-inline">
                            <input type="text" name="username" class="layui-input" autocomplete="on" placeholder="用户名">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">
                            <i class="layui-icon" style="font-size: 30px;">&#xe658;</i>
                        </label>
                        <div class="layui-input-inline">
                            <input type="password" name="password" class="layui-input" autocomplete="on" placeholder="密码">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" id="login">登录</button>
                            <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="s-foot">
            <p style="font-size: 15px;font-weight: bold;color: #393D49;">Copyright © 2018 DreamPHP All rights</p>
        </div>
    </div>

    <script src="layui/layui.js"></script>
    <script>
        layui.use(['layer'], function () {
            var layer = layui.layer,
                $ = layui.jquery;

            $('#login').on('click', function () {
                data = $('form').serialize();
                layer.alert(data, {
                    title:'登录信息',
                    skin:'layui-layer-molv',
                    anim:6
                }, function (index) {
                    window.location.href= 'index.html';
                    layer.close(index);
                });
                return false;
            });
        });
    </script>
</body>
</html>